package com.zysstudy.service.impl;

import com.zysstudy.Dao.AreaDao;
import com.zysstudy.domain.Area;
import com.zysstudy.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhaoyoushui
 * @date 2023/9/7 9:35
 */
@Service
public class AreaServiceImpl implements AreaService {

    @Autowired
    private AreaDao areaDao;

    public List<Area> findByTypeId(@Param("typeId") int typeId) {
        return areaDao.findByTypeId(typeId);
    }

    public Area findById(@Param("id") int id) {
        return areaDao.findById(id);
    }
}
